package designpattern.builder;

/*
    指挥者,如何建房子的步骤交给指挥者
 */
public class HouseDirector {
    private HouseBuilder houseBuilder;

    public HouseDirector() {
    }

    public HouseDirector(HouseBuilder houseBuilder) {
        this.houseBuilder = houseBuilder;
    }

    public void setHouseBuilder(HouseBuilder houseBuilder) {
        this.houseBuilder = houseBuilder;
    }

    public House constructHouse(){
        houseBuilder.bisic();
        houseBuilder.walls();
        houseBuilder.roofed();
        return houseBuilder.builder();
    }
}
